package com.zd.controller;

import com.zd.model.Major;
import com.zd.service.IDepartmentService;
import com.zd.service.IMajorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("/major")
public class MajorController {

    @Autowired
    private IMajorService majorService;


    @ResponseBody
    @GetMapping("/selectMajorInfo")
    public List<Major> selectMajorInfo() {
        return majorService.selectMajorInfo();
    }

    @ResponseBody
    @PostMapping("/selectMajor")
    public List<Major> selectMajor(@RequestParam Map<String, Object> majorMap) {
        return majorService.selectMajor(majorMap);
    }
}
